package com.mazaiting.sms.service.impl;

import com.mazaiting.sms.domain.entity.MsgSmsTemplate;
import com.mazaiting.sms.mapper.IMsgSmsTemplateMapper;
import com.mazaiting.sms.service.IMsgSmsTemplateService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.Optional;

/**
 * 短信消息模板表 服务实现类
 *
 * @author 党海亮
 * @since 2022-04-16
 */
@Service
public class MsgSmsTemplateServiceImpl extends ServiceImpl<IMsgSmsTemplateMapper, MsgSmsTemplate> implements IMsgSmsTemplateService {

    @Override
    public Optional<MsgSmsTemplate> findByCode(String code) {
        return lambdaQuery().eq(MsgSmsTemplate::getCode, code).oneOpt();
    }
}
